////////////////////////////////////////////////////////////////////////////////
//                                                                            //
//                           BailterRay                                       //
//                    Pip Robbins & Zhao Zhang                                //
//                                                                            //
////////////////////////////////////////////////////////////////////////////////
class BailterRayBonusLivePickup extends BailterRayPickupFactory
                placeable;

var BailterRayHUD MyHud;

function SpawnCopyFor( Pawn Recipient )
{
    local BailterRayPlayerController BPC;

	if ( UTPawn(Recipient) == None )
		return;

	Recipient.MakeNoise(0.2);
	AddLive(Recipient.Controller);
	BPC = BailterRayPlayerController(Recipient.Controller);
	if(BPC != none)
	{
	    MyHud = BailterRayHUD(BPC.myHUD);
        MyHud.PickupTextureType = 2;
        MyHud.bShowPickupDes = true;
        setTimer(3,false,'DisableDescription');
	}
	super.SpawnCopyFor(Recipient);
	PickupEffect.SetScale(1.5);
}


function DisableDescription()
{
    if(MyHud != none)
    {
        MyHud.bShowPickupDes = false;
        //MyHud.PickupDesCounter[2]++;
    }
}

simulated function Respawn(Pawn P)
{
 //don't respawn
}

function AddLive(Controller P)
{
    P.PlayerReplicationInfo.Deaths-=1.0;
}

defaultproperties
{
   PickupSound=SoundCue'BailterRaySoundPackages.PICKUPS.Pickup_SoundCue'
      Begin Object class=StaticMeshComponent Name=LivesPickUpComp
      StaticMesh=StaticMesh'BailterRayAssetPackageLevel1.Powerups.Health_powerup'
      Scale3D=(X=0.850000,Y=0.850000,Z=0.850000)
   End Object
   PickupMesh=LivesPickUpComp
   Components(6)=LivesPickUpComp
   ParticleEffectsGlow=ParticleSystem'BailterRayAssetPackageLevel1.Powerups.Powerups_Spawn_Effect'
}